<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>登陆</title>
    <style>
        .btn-gradient {
            background: linear-gradient(to right, #28a745, #218838);
            color: white;
            border: none;
            padding: 10px 30px;
            font-weight: bold;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }
        .btn-gradient:hover {
            transform: scale(1.05);
            background: linear-gradient(to right, #218838, #28a745);
        }
    </style>
</head>
<body>
<center>
    <div class="container mt-5">
        <div class="row justify-content-center">
            <div class="col-md-6">
                <div class="card shadow-sm border-0">
                    <div class="card-header bg-primary text-white text-center">
                        <h4 class="mb-0">📚 欢迎使用在线图书管理系统</h4>
                    </div>
                    <div class="card-body">
                        <form action="loginServlet" method="post">
                            <div class="mb-3">
                                <label for="username" class="form-label">账号：</label>
                                <input type="text" class="form-control" id="username" name="username" value="${username}" placeholder="请输入账号">
                            </div>
                            <div class="mb-3">
                                <label for="password" class="form-label">密码：</label>
                                <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
                            </div>



                            <p class="d-grid">
                                <button type="submit" class="btn-gradient">
                                    登录
                                </button>
                            </p>
                        </form>
                        <div class="mt-3 text-center">
                            <a href="regist.jsp" class="text-decoration-none">📝 没有账号？点击注册</a>
                        </div>
                        <div class="mt-2 text-center text-danger">
                            ${msg}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</center>
</body>
</html>